<%-- 
    Document   : ContentFavoritesView
    Created on : May 20, 2010, 10:38:00 PM
    Author     : vasi
--%>

<%@page import="java.util.*" %>
<%@page import="entities.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>View favorites list</title>
        <link href="<% out.print(request.getContextPath()); %>/styles/default.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <jsp:include page="fragments/Header.jsp" />
        <div id="page">
            <h1>Favorites list view</h1>
            <div id="page_content">
                <%
                    List<ContentEntity> contentList = (List)request.getAttribute("contentList");
                    Iterator<ContentEntity> contentListIt = contentList.iterator();
                    out.println("<div>");
                    while (contentListIt.hasNext()){
                        ContentEntity content = contentListIt.next();
                        out.println("<div>");
                            out.println("<h3><a href=\""+request.getContextPath()+"/content/view?cid="+content.getCid()+"\">"+content.getTitle()+"</a></h3>");
                            out.println("<p>"+content.getBody()+"</p>");
                        out.println("</div>");
                    }
                    out.println("</div>");
                %>
            </div>
        </div>
    </body>
</html>
